package org.space.galaxyCabinet.constant;

/**
 * Emqx常量信息
 *
 */
public class EmqxConstants {

    //    设备在线监听
    public static final String SYS_DEVICE_ONLINE  = "$SYS/brokers/+/clients/#";

    // 设备主题常量
    public static final String DEVICE_ALL_STATUS = "device/all/status"; // 设备状态
    public static final String DEVICE_ALL_CONTROL = "device/all/control"; // 设备控制
    public static final String DEVICE_ALL_DATA = "device/all/data"; // 设备数据
    public static final String DEVICE_ALL_FREIGHT_CHANNEL = "device/all/freightChannel"; // 货道状态模板（需传入 id 构成完整主题）
    public static final String DEVICE_ALL_ORDER = "device/all/order"; // 订单处理
    public static final String DEVICE_ALL_ERROR = "device/all/error"; // 设备错误
    public static final String DEVICE_ALL_LOG = "device/all/log"; // 设备错误
    public static final String DEVICE_ALL_WILL = "device/all/will"; // 设备错误
    public static final String DEVICE_ALL_GENERATE_ORDER = "device/all/generateOrder";
    // 系统主题常量
    public static final String SYSTEM_BROADCAST = "system/broadcast"; // 系统广播
    public static final String SYSTEM_COMMAND = "system/command"; // 系统命令
    public static final String SYSTEM_ALERT = "system/alert"; // 系统告警
    public static final String SYSTEM_UPDATE = "system/update"; // 系统更新

    public static String[] getAll() {
        return new String[]{
            SYS_DEVICE_ONLINE,
            DEVICE_ALL_STATUS,
            DEVICE_ALL_CONTROL,
            DEVICE_ALL_DATA,
            DEVICE_ALL_FREIGHT_CHANNEL,
            DEVICE_ALL_ORDER,
            DEVICE_ALL_LOG,
            DEVICE_ALL_WILL,
            DEVICE_ALL_GENERATE_ORDER,
            DEVICE_ALL_ERROR,
            SYSTEM_BROADCAST,
            SYSTEM_COMMAND,
            SYSTEM_ALERT,
            SYSTEM_UPDATE
        };
    }
}
